from django.db import models
from utils.base_model import BaseModel
from users.models import User

# Create your models here.
class OAuthQQUser(BaseModel):
    user = models.ForeignKey(User, on_delete=models.CASCADE, verbose_name='user')
    openid = models.CharField(max_length=50, verbose_name='openid', db_index=True)

    class Meta:
        db_table = 'tb_oauth_qq'


class WeiboUser(BaseModel):
    user = models.ForeignKey(User, on_delete=models.CASCADE, verbose_name='user')
    uid = models.CharField(max_length=50, verbose_name='uid', db_index=True)

    class Meta:
        db_table = 'tb_oauth_weibo'